package bt19022014_congty;

public class DiaChi {
	private String soNha;
	private String tenDuong;
	private String tenQuan;
	private String tenTP;
	
	public DiaChi(){
		soNha = null;
		tenDuong = null;
		tenQuan = null;
		tenTP = null;
	}
	
	public DiaChi(String soNha, String tenDuong, String tenQuan, String tenTP){
		this.soNha = soNha;
		this.tenDuong = tenDuong;
		this.tenQuan = tenQuan;
		this.tenTP = tenTP;
	}
	
	public boolean equals(Object obj){
		if (obj instanceof DiaChi){
			return ((DiaChi) obj).soNha.equals(soNha)
				&& ((DiaChi) obj).tenDuong.equals(tenDuong)
				&& ((DiaChi) obj).tenQuan.equals(tenQuan)
				&& ((DiaChi) obj).tenTP.equals(tenTP);
		}
		return false;
	}
	
	public String getDiaChi(){
		return ("So nha "+soNha+", duong "+tenDuong+", quan "+tenQuan+", Thanh pho "+tenTP);
	}
}
